import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;


public class SampleArray{
	
	public static void main(String args[]){
		 int a[]={5,4,9,6,9,0,4};
		 
	Set set = new HashSet();
		
		set.add(5);
		set.add(4);
		set.add(9);
		set.add(6);
		set.add(0);
		set.add(4);
		System.out.println(set);
		Set Set = new TreeSet(set);
		System.out.println(Set);
		Iterator it = set.iterator();
		while (it.hasNext()){
			System.out.println(it.next());
		}
		}
		
	}
		
		
		
		
		
	

